﻿namespace Refract.Services
{
    using System;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Ink;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;

    using Refract.MVVM;

    public class Service : Component
    {
        #region Fields

        private bool _isBusy;
        private int _processCount;

        #endregion Fields

        #region Properties

        public bool IsBusy
        {
            get { return _isBusy; }
            set
            {
                _isBusy = value;
                RaisePropertyChanged(new { IsBusy });
            }
        }

        public int ProcessCount
        {
            get { return _processCount; }
            protected set
            {
                _processCount = value;
                IsBusy = _processCount > 0;
                RaisePropertyChanged(new { ProcessCount });
            }
        }

        #endregion Properties
    }
}